<?php
/**
 * 统计某种卡券
 */
require_once('common.php');

$tongji_url = 'https://api.weixin.qq.com/datacube/getcardcardinfo?access_token=';
$access_token = get_access_token();

$postData = array(
    'begin_date' => '2019-02-25',  //开始时间
    'end_date'   => '2019-02-28',
    'cond_source' => 1,  //卡券来源，0为公众平台创建的卡券数据 、1是API创建的卡券数据
    'card_id' => 'pEZwf1DduS5dwTDyQXyqOp7B5xS4' //某种卡券的
);
$tongjiArr = tongjicode($tongji_url.$access_token, $postData);
echo '<pre>';
print_r($tongjiArr);exit;

function tongjicode($url, $data){
    $result = jsonpostJson($url, $data, true);
    return $result;
}